package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RcSocio generated by hbm2java
 */
@Entity
@Table(name = "RC_SOCIO", schema = "RUC")
public class RcSocio implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3718442895252524392L;
	private RcSocioId id;
	private RcRuc rcRucByNit;
	private RcRuc rcRucByNitSocio;
	private String cusuario;
	private Double vporcPart;
	private Date fhingreso;
	private String nfolio;
	private Date fisocio;
	private Date ffsocio;

	public RcSocio() {
	}

	public RcSocio(RcSocioId id, RcRuc rcRucByNit, RcRuc rcRucByNitSocio,
			String cusuario, Double vporcPart, Date fhingreso) {
		this.id = id;
		this.rcRucByNit = rcRucByNit;
		this.rcRucByNitSocio = rcRucByNitSocio;
		this.cusuario = cusuario;
		this.vporcPart = vporcPart;
		this.fhingreso = fhingreso;
	}

	public RcSocio(RcSocioId id, RcRuc rcRucByNit, RcRuc rcRucByNitSocio,
			String cusuario, Double vporcPart, Date fhingreso, String nfolio,
			Date fisocio, Date ffsocio) {
		this.id = id;
		this.rcRucByNit = rcRucByNit;
		this.rcRucByNitSocio = rcRucByNitSocio;
		this.cusuario = cusuario;
		this.vporcPart = vporcPart;
		this.fhingreso = fhingreso;
		this.nfolio = nfolio;
		this.fisocio = fisocio;
		this.ffsocio = ffsocio;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nit", column = @Column(name = "NIT", nullable = false, length = 14)),
			@AttributeOverride(name = "nitsocio", column = @Column(name = "NIT_SOCIO", nullable = false, length = 14)),
			@AttributeOverride(name = "faparticipacion", column = @Column(name = "FA_PARTICIPACION", nullable = false, length = 4)) })
	public RcSocioId getId() {
		return this.id;
	}

	public void setId(RcSocioId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT", nullable = false, insertable = false, updatable = false)
	public RcRuc getRcRucByNit() {
		return this.rcRucByNit;
	}

	public void setRcRucByNit(RcRuc rcRucByNit) {
		this.rcRucByNit = rcRucByNit;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "NIT_SOCIO", nullable = false, insertable = false, updatable = false)
	public RcRuc getRcRucByNitSocio() {
		return this.rcRucByNitSocio;
	}

	public void setRcRucByNitSocio(RcRuc rcRucByNitSocio) {
		this.rcRucByNitSocio = rcRucByNitSocio;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "V_PORC_PART", nullable = false, precision = 7, scale = 4)
	public Double getVporcPart() {
		return this.vporcPart;
	}

	public void setVporcPart(Double vporcPart) {
		this.vporcPart = vporcPart;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "N_FOLIO", length = 12)
	public String getNfolio() {
		return this.nfolio;
	}

	public void setNfolio(String nfolio) {
		this.nfolio = nfolio;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FI_SOCIO", length = 7)
	public Date getFisocio() {
		return this.fisocio;
	}

	public void setFisocio(Date fisocio) {
		this.fisocio = fisocio;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FF_SOCIO", length = 7)
	public Date getFfsocio() {
		return this.ffsocio;
	}

	public void setFfsocio(Date ffsocio) {
		this.ffsocio = ffsocio;
	}

        @Override
        public String toString() {
            return "RcSocio{" + "id=" + id + ", cusuario=" + cusuario + ", vporcPart=" + vporcPart + ", fhingreso=" + fhingreso + ", nfolio=" + nfolio + ", fisocio=" + fisocio + ", ffsocio=" + ffsocio + '}';
        }

        
}
